<template>
  <div>
    <h1>登录日志</h1>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="name" label="用户名" width="180">
      </el-table-column>
      <el-table-column prop="ip" label="登录IP" width="180"> </el-table-column>
      <el-table-column prop="time" label="登录时间"> </el-table-column>
    </el-table>
    <h1>{{ msg }}</h1>
  </div>
</template>

<script>
import axios from "axios";

export default {
  name: "LoginInfo",
  data() {
    return {
      tableData: [],
      msg: "",
    };
  },

  created() {
    console.log(this.$route.params.id);
    axios({
      method: "get",
      url: "http://localhost:8080/logininfo?id=" + this.$route.params.id,
    }).then((res) => {
      this.tableData = res.data;
    });
  },
};
</script>

<style lang="scss" scoped>
</style>